//
//  Fraction.h
//  02_分数
//
//  Created by dllo on 16/7/5.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
@property (nonatomic, assign) NSInteger numerator;      // 分子
@property (nonatomic, assign) NSInteger denominator;    // 分母

- (instancetype)initWithNumerator:(NSInteger)numerator
                      denominator:(NSInteger)denominator;
+ (instancetype)fractionWithNumerator:(NSInteger)numerator
                          denominator:(NSInteger)denominator;
- (Fraction *)add:(Fraction *)fraction;
- (Fraction *)subtract:(Fraction *)fraction;
- (Fraction *)multiply:(Fraction *)fraction;
- (Fraction *)divide:(Fraction *)fraction;
- (NSInteger)compare:(Fraction *)fraction;
- (void)reduce;


@end
